import React, { Component } from "react";

interface IProps {
    name: string;
    age: number;
}
class Classcomponents extends Component<IProps,IProps> {
    constructor(props: IProps) {
        super(props);
        this.state = {
            name: "2classParent 父亲组件",
            age: 38
        };
    }

    render() {
        return (
            <div>
                <h1>2classParent 父亲组件</h1>
                <p>姓名：{this.state.name}</p>
                <p>年龄：{this.state.age}</p>
            </div>
        );
    }
}

export default Classcomponents;